package main

import (
	"log"
	"os"

	"gitee.com/terender/sfw/signature"
	"gitee.com/terender/sfw/utils"
)

func main() {
	if len(os.Args) != 2 {
		log.Print(`需要一个参数`)
		return
	}
	keyName := os.Args[1]
	_, err := signature.GenerateKeyPairs(keyName, 2048)
	if err != nil {
		log.Print(err)
		return
	}
	log.Printf(`密钥生成成功，请查看 %v/static/keystore/%v.***.key`, utils.ProjectPath(), keyName)
}
